package com.lc202310;

/**
 * Description:
 *
 * @Create 2023/10/26 23:10
 * @Version 1.0
 */
public class Solution2520 {
    public static int countDigits(int num) {
        int res = 0;
        int tmp = num;
        while (tmp > 0) {
            int a = tmp % 10;
            if (a != 0 && num % a == 0) {
                res++;
            }
            tmp = tmp / 10;
        }
        return res;
    }

    public static void main(String[] args) {
        countDigits(10);
    }
}
